<?php
$HTMLstr .= '<div class="body">
    <div class="findOne">
    <div class="findOneInside">';

if (!empty($this->message)) {
    $HTMLstr .= '<div class="head">
        '.$this->message.'
         </div>';
}

if (null == $this->oneModel) {
    $this->oneModel = new model_UserModel(null);
}

$HTMLstr .= '<form action="?controller=register&action=save" method="post" enctype=multipart/form-data>
        <div class="head">
        Логин:
        </div>

        <div class="fetchallOne" id="frame">
        <textarea cols="30" rows="1" name="username">'. $this->oneModel->getUsername() .'</textarea>
            </div>
            
        <div class="head">
        Пароль:
        </div>

        <div class="fetchallOne" id="frame">
          <textarea cols="30" rows="1" name="password">'. $this->oneModel->getPassword() .'</textarea>
              </div>
        <div class="head">
        Повторите пароль:
         </div>

        <div class="fetchallOne" id="frame">
          <textarea cols="30" rows="1" name="rpassword"></textarea>
           </div>

        <div class="head">
        Личные данные (необязательно)
        </div>

        <div class="head">
        Пол:
        <input type="radio" name="sex" value="m"> Мужской
        <input type="radio" name="sex" value="w"> Женский
        </div>

        <div class="head">
        Возраст: <select name="age">
    <option value="0">Не важно</option>';
for ($i=16;$i<61;$i++) { 
    $HTMLstr .= '<option value="'. $i .'"';
    if($this->oneModel->getAge() == $i){
     $HTMLstr .= 'SELECTED';
    }
    $HTMLstr .= '>'. $i .'</option>';
}
$HTMLstr .= '</select>
    </div>

        <div class="head">
        Имя:
        </div>

        <div class="fetchallOne" id="frame">
        <textarea cols="30" rows="1" name="name">'. $this->oneModel->getName() .'</textarea>
            </div>

        <div class="head">
        Фамилия:
        </div>

        <div class="fetchallOne" id="frame">
        <textarea cols="30" rows="1" name="surname">'. $this->oneModel->getSurname() .'</textarea>
        </div>

        <div class="head">
        Аватар:
        </div>

        <div class="fetchallOne" id="frame">
        <input type="file" name="file">
        </div>

        <div class="head">
        О себе:
        </div>

        <div class="fetchallOne" id="frame">
        <textarea cols="30" rows="3" name="about">'. $this->oneModel->getAbout() .'</textarea>
            </div>

        <div class="fetchallOne" id="frame">
        <input type="submit" value="Зарегистрироваться">
        </div>
      </form>
      </div>
      </div>
      </div>';